<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>快餐店点餐系统</title>
    <style>
        body {
            font-family: "Arial", sans-serif;
            margin: 0;
            padding: 0;
            display: flex;
            min-height: 100vh;
            background: linear-gradient(to bottom, #aed581, #81c784);
            color: #333;
        }

        .sidebar {
            width: 250px;
            background: #388e3c;
            color: white;
            display: flex;
            flex-direction: column;
            padding: 20px;
            box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
        }

        .sidebar h2 {
            text-align: center;
            margin-bottom: 20px;
        }

        .sidebar a {
            text-decoration: none;
            color: white;
            padding: 10px 15px;
            margin-bottom: 10px;
            border-radius: 5px;
            background-color: #4caf50;
            transition: background 0.3s;
            text-align: center;
        }

        .sidebar a:hover {
            background-color: #66bb6a;
        }

        .content {
            flex-grow: 1;
            padding: 20px;
        }

        .content h1 {
            color: #388e3c;
            margin-bottom: 20px;
            text-align: center;
        }

        .content p {
            color: #555;
            font-size: 16px;
            text-align: center;
        }

        footer {
            margin-top: 20px;
            text-align: center;
            color: #666;
            font-size: 14px;
        }
    </style>
</head>
<body>
<div class="sidebar">
    <h2>快餐店系统</h2>
    <a href="admin.jsp">主页</a>
    <c:if test="${sessionScope.user.role == 3}">
        <a href="MenuServlet">菜单管理</a>
        <a href="OrderServlet">订单管理</a>
    </c:if>
    <c:if test="${sessionScope.user.role == 1}">
        <a href="MenuServlet">菜单管理</a>
        <a href="CategoryServlet">分类管理</a>
        <a href="OrderServlet">订单管理</a>
    </c:if>
    <c:if test="${sessionScope.user.role == 2}">
        <a href="OrderServlet">订单管理</a>
        <a href="TaskServlet">任务管理</a>
    </c:if>
    <a href="logout.jsp">退出系统</a>
</div>
<div class="content">
    <h1>欢迎使用快餐店点餐系统</h1>
    <p>通过左侧导航栏选择功能模块。</p>
    <footer>&copy; 快餐店点餐系统</footer>
</div>
</body>
</html>
